{# Modal for ownership transfer #}
<div class='modal fade' id='ownerModal' tabindex='-1' role='dialog' aria-labelledby='ownerModalLabel'>
  <div class='modal-dialog' role='document'>
    <div class='modal-content'>
      <div class='modal-header'>
        <h5 class='modal-title' id='ownerModalLabel'>{{ 'Transfer ownership'|trans }}</h5>
        <button type='button' class='close' data-dismiss='modal' aria-label='{{ 'Close'|trans }}'>
          <span aria-hidden='true'>&times;</span>
        </button>
      </div>
      <div class='modal-body'>
        {# SELECT USER #}
        <label for='target_owner'>{{ 'New owner'|trans }}</label>
        {# this exists so Firefox doesn't process the Search user field as password. No idea why it would do it in the first place though... #}
        {# and autocomplete='off' doesn't work #}
        <input type='password' disabled hidden />
        <input type='text' placeholder='{{ 'Search user'|trans }}' id='target_owner' class='form-control' data-identifier='targetOwnerInput' data-action='autocomplete' data-target='users'>
        <div id='autocompleteAnchorDiv_targetOwnerInput'></div>
      </div>
      <div class='modal-footer'>
        <button type='button' class='btn btn-secondary' data-dismiss='modal'>{{ 'Close'|trans }}</button>
        {% if App.Request.getScriptName|split('/')|last == 'admin.php' %}
          <button type='button' class='btn btn-primary' data-action='run-action-selected' data-what='updateowner' data-dismiss='modal'>{{ 'Transfer ownership'|trans }}</button>
        {% else %}
          <button type='button' class='btn btn-primary' data-action='transfer-ownership' data-dismiss='modal'>{{ 'Transfer ownership'|trans }}</button>
        {% endif %}
      </div>
    </div>
  </div>
</div>
